﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Skala.master" AutoEventWireup="true" CodeFile="Siparis.aspx.cs" Inherits="Siparis" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    
    <style>        
        .inputhata { position:absolute; display:block; background:#e00; white-space:nowrap; padding:6px; text-align:left; font-size:9pt; color:#fff; text-shadow:none; border-radius:4px; z-index:999  }
        .inputhata:before { position:absolute; left:-6px; top:7px; color:#e00; content:'◄'; font-size:6pt  }
    </style>

      <script src="js/jquery.plugin.js" type="text/javascript"></script>
    <script>
        $(document).ready(function () {
            $("#<%=btnAdres.ClientID %>").click(function () {
                $("#<%=adres.ClientID %>").animate({ left: "50px", top:"200px", opacity: 1 }, 1500, "easeInOutBack");
            });

            $("#<%=btnKaydet.ClientID %>").click(function () {

                $("#<%=adres.ClientID %>").animate({ left: "-900px", opacity: 0 }, 10, "easeInOutBack");
             });

            $(document).keyup(function (e) {

                if (e.keyCode == 27) { $("#<%=adres.ClientID %>").animate({ left: "-900px", opacity: 0 }, 1500, "easeInOutBack"); }   // esc
             });

            $("#btnAdresEkle").click(function () {
                var success = true;
                if(!kontrolEt('#' + '<%= txtTelefon.ClientID  %>')) success=false;
                if(!kontrolEt('#' + '<%= txtUlke.ClientID  %>')) success=false;
                if(!kontrolEt('#' + '<%= txtSehir.ClientID  %>')) success=false;
                if(!kontrolEt('#' + '<%= txtIlce.ClientID  %>')) success=false;
                if(!kontrolEt('#' + '<%= txtAdres.ClientID  %>')) success=false;
                if (!kontrolEt('#' + '<%= txtAdresTanimi.ClientID  %>')) success = false;
                if (success)
                    $('#' + '<%= btnKaydet.ClientID  %>').trigger("click");
             });

        });
</script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div></div>
        
    <div style="clear:both">
        <div style="float:left">İndirim Kodu:</div>
        <div style="float:left"><asp:TextBox ID="txtIndirimKodu" runat="server" OnTextChanged="txtIndirimKodu_TextChanged" AutoPostBack="true"></asp:TextBox></div>
    </div>
    <div style="clear:both">
        <div style="float:left">Para Puan :</div><div style="float:left"><asp:Label ID="lblParaPuan" runat="server" Text="Label"></asp:Label></div>
        <div style="float:left"><asp:CheckBox ID="chkParaPuan" runat="server" Text="Para puanlarımı kullanmak istiyorum" AutoPostBack="true" OnCheckedChanged="chkParaPuan_CheckedChanged" /> </div>
    </div>
    <div style="clear:both">
        <div style="float:left">Toplam Tutar : </div><div style="float:left"><asp:Label ID="lblToplamTtar" runat="server" Text="Label"></asp:Label></div>
    </div>
    <div style="clear:both">
        <div style="float:left">Ödenecek Tutar : </div><div style="float:left"><asp:Label ID="lblOdenecekTutar" runat="server" Text="Label"></asp:Label></div>
    </div>
    <%--<div>
        <asp:Button ID="btnSiparis" runat="server"  Text="Siparişi Tamamla" PostBackUrl="~/Odeme.aspx"  /> 
    </div>--%>
    
    <div style="clear:both"></div>
<div>
    <div style="float:left">Ödeme Şekli</div><div style="float:left"><asp:DropDownList ID="ddlOdemeSekli" runat="server">
    <asp:ListItem Value="1">Tek Çekim</asp:ListItem>
    <asp:ListItem Value="2">Taksit</asp:ListItem>
    <asp:ListItem Value="3">Havale</asp:ListItem>
    </asp:DropDownList></div>
</div>
<div style="clear:both">
    <div style="float:left">Kargo</div><div style="float:left"><asp:DropDownList ID="ddlKargo" runat="server"></asp:DropDownList></div>
</div>
<div style="clear:both">
    <div style="float:left">Adres</div>
    <div style="float:left"><asp:DropDownList ID="ddlAdres" runat="server" DataSourceID="dsAdres" DataTextField="AdresAdi" DataValueField="AdresId"></asp:DropDownList>
        
    </div>
    <div style="float:left"><input id="btnAdres" type="button" value="Adres Ekle" runat="server" /></div>
    
</div>
<div style="clear:both">
    <div style="float:left">Teslim Edilecek Kişi:</div>
    <div style="float:left"><asp:TextBox ID="txtTeslimEdilecekKisi" runat="server" ></asp:TextBox></div>
</div>
<div style="clear:both">
    <div style="float:left">Teslimat Tarihi:</div>
    <div style="float:left">
<asp:TextBox ID="txtTeslimatTarihi" runat="server"></asp:TextBox>  
  <asp:CalendarExtender ID="CalendarExtender1" TargetControlID="txtTeslimatTarihi" runat="server" Format="dd.MM.yyyy"></asp:CalendarExtender>
    </div>    
</div>
<div style="clear:both">
    <div style="float:left">Teslimat notu:</div>
    <div style="float:left"><asp:TextBox ID="txtTeslimatNotu" runat="server" Height="66px" TextMode="MultiLine" ></asp:TextBox></div>
</div>
<div style="clear:both"><asp:Button id="btnOdeme" Text="Ödeme yap" runat="server" OnClick="btnOdeme_Click" /></div>
<div id="adres" style="position:absolute;background-color:gainsboro;top:200px;left:-900px;margin-top:30px;margin-left:50px;width:750px;opacity:0;z-index:900" runat="server">
    <div>
        <div style="float:left">Adres Tanımı</div>
        <div style="float:left"><asp:TextBox ID="txtAdresTanimi" runat="server"  > </asp:TextBox>
            <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Zorunlu Alan" ControlToValidate="txtAdresTanimi" Display="Dynamic"></asp:RequiredFieldValidator>--%></div>
    </div>
    <div style="clear:both">
        <div style="float:left">Açık Adres</div>
        <div style="float:left"><asp:TextBox ID="txtAdres" runat="server"  Height="66px" TextMode="MultiLine"  ></asp:TextBox>
            <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Zorunlu Alan" ControlToValidate="txtAdres" Display="Dynamic"></asp:RequiredFieldValidator>--%>
        </div>
    </div>
    <div style="clear:both">
        <div style="float:left">İlçe</div>
        <div style="float:left"><asp:TextBox ID="txtIlce" runat="server"  ></asp:TextBox>
            <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="Zorunlu Alan" ControlToValidate="txtIlce" Display="Dynamic"></asp:RequiredFieldValidator>--%>
        </div>
    </div>
    <div style="clear:both">
        <div style="float:left">Şehir</div>
        <div style="float:left"><asp:TextBox ID="txtSehir" runat="server"  ></asp:TextBox>
            <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="Zorunlu Alan" ControlToValidate="txtSehir" Display="Dynamic"></asp:RequiredFieldValidator>--%>
        </div>
    </div>
    <div style="clear:both">
        <div style="float:left">Ülke</div>
        <div style="float:left"><asp:TextBox ID="txtUlke" runat="server"  ></asp:TextBox>
            <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="Zorunlu Alan" ControlToValidate="txtUlke" Display="Dynamic"></asp:RequiredFieldValidator>--%>
        </div>
    </div>
    <div style="clear:both">
        <div style="float:left">Telefon</div>
        <div style="float:left"><asp:TextBox ID="txtTelefon" runat="server"  ></asp:TextBox></div>
    </div>
    <div style="clear:both">
        <div style="float:left">Adres Detayları</div>
        <div style="float:left"><asp:TextBox ID="txtDetay" runat="server"  Height="66px" TextMode="MultiLine"  ></asp:TextBox></div>
    </div>
    <div style="clear:both">
        <div style="float:left"><input type="button" id="btnAdresEkle" class="btn btn-info" value="Adres Ekle"  /> <asp:Button ID="btnKaydet" UseSubmitBehavior="false" runat="server" Text="Adres Ekle" OnClick="btnKaydet_Click" style="display:none" /></div>
    </div>
</div>
   <asp:SqlDataSource ID="dsAdres" runat="server" ConnectionString="<%$ ConnectionStrings:Skala %>" SelectCommand="SELECT [AdresId], [AdresAdi] FROM [Adres] WHERE ([UyeId] = @UyeId)">
            <SelectParameters>
                <asp:SessionParameter DefaultValue="-1" Name="UyeId" SessionField="UyeId" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>


</asp:Content>

